home *** CD-ROM | disk | FTP | other *** search
- /* NIBinder.h
- Abstraction of the NetInfo binder (nibindd)
- Copyright (c) 1994, NeXT Computer, Inc.
- All rights reserved.
- */
-
- #ifndef STRICT_OPENSTEP
-
- #import <NIAccess/NINetInfo.h>
- #import <Foundation/NSHost.h>
- #import <Foundation/NSString.h>
- #import <Foundation/NSArray.h>
- #import <Foundation/NSDate.h>
-
- #import <objc/objc.h>
-
- @class NIServer;
-
- @interface NIBinder : NSObject
- {
- @private
- void *binder;
- id reserved;
- }
-
- /*
- * Get a binder object. Binders are cached for efficiency. Only one
- * shared instance of a binder will exist.
- * Addresses must be "Dotted Decimal" strings, e.g.
- *
- * NIBinder nibind = [NIBinder binderWithAddress:@"192.42.172.1"];
- *
- */
- + (NIBinder *)localBinder;
- + (NIBinder *)binderWithHost:(NSHost *)host;
- + (NIBinder *)binderWithAddress:(NSString *)address;
-
- /*
- * Binder cache management
- * If enabled, only one object representing each host will be created, and
- * a shared instance will be returned by all methods that return a host.
- */
- + (void)setBinderCacheEnabled:(BOOL)flag;
- + (BOOL)isBinderCacheEnabled;
- + (void)flushBinderCache;
-
- /*
- * Initilaize a binder (bypasses cacheing)
- */
- - (NIBinder *)initWithHost:(NSHost *)host;
-
- /*
- * Control Timeouts. Default timeout is 25 seconds.
- */
- - (void)setTimeout:(NSTimeInterval)time;
- - (NSTimeInterval)timeout;
-
- /*
- * Autheticate as root to the binder
- */
- - (void)authenticateWithPassword:(NSString *)password;
-
- /*
- * Get port numbers for a tag
- */
- - (void)getPortsForTag:(NSString *)tag
- udp:(unsigned short *)udp
- tcp:(unsigned short *)tcp;
- - (unsigned short)tcpPortForTag:(NSString *)tag;
- - (unsigned short)udpPortForTag:(NSString *)tag;
-
- /*
- * Get an array of tags served
- */
- - (NSArray *)tags;
-
- /*
- * Server management
- */
- - (NIStatus)createMasterWithTag:(NSString *)tag;
- - (NIStatus)createCloneWithTag:(NSString *)tag master:(NIServer *)master;
- - (NIStatus)destroyServerWithTag:(NSString *)tag;
-
- @end
-
- #endif STRICT_OPENSTEP
-